from opencc import OpenCC

# 创建 OpenCC 实例，指定繁体字转简体字的配置
cc = OpenCC('t2s')  # 't2s' 表示繁体字转简体字

# 读取文件内容
with open('sellData.csv', 'r', encoding='gbk') as file:
    content = file.read()

# 将繁体字转为简体字
converted_content = cc.convert(content)

# 将转换后的内容写入新文件
with open('output.txt', 'w', encoding='utf-8') as file:
    file.write(converted_content)